/**
 * 表格配置
 * 字典管理 dict-manage
 */
const headerConfig = {
  'dict-manage': [
    {
      prop: 'dictCode',
      name: '字典编码'
    },
    {
      prop: 'label',
      name: '字典名称'
    },
    {
      prop: 'value',
      name: '字典值'
    },
    {
      prop: 'sort',
      name: '排序号'
    },
    {
      prop: 'isDefault',
      name: '是否默认'
    },
    {
      prop: 'remark',
      name: '备注'
    },
    {
      prop: 'statusName',
      name: '状态',
      minWidth: 100,
      componentCell: 'CellSwitch',
      authId: 'grass-core:dict:enableOrDisable',
      switchConfig: {
        valueTypeProp: 'code',
        dataProp: 'status',
        activeCode: 1,
        activeName: '启用',
        inactiveCode: 2,
        inactiveName: '禁用',
        switchPath: 'dictManage.enableOrDisable',
        switchParamsProp: {
          id: 'id',
          label: 'label',
          value: 'value',
          sort: 'sort',
          dictCode: 'dictCode',
          remark: 'remark',
          name: 'name'
        }
      }
    },
    {
      name: '操作',
      width: 150,
      fixed: 'right',
      thStyle: { 'text-align': 'left' },
      operateList: [
        {
          type: 'btnText',
          label: '编辑',
          id: 'dict-edit-detail',
          authId: 'grass-core:dict:update',
          config: {
            type: 'text'
          }
        },
        {
          type: 'btnText',
          label: '删除',
          id: 'dict-manage-delete',
          authId: 'grass-core:dict:deleteById',
          style: { color: '#f74a5c' },
          config: {
            type: 'text'
          }
        }
      ]
    }
  ]
}

export default {}
export { headerConfig }
